package com.myblog.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.myblog.pojo.Wechat;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface Wechatmapper extends BaseMapper<Wechat> {
    @Select("SELECT * FROM user_imformation ORDER BY user_imformation.time DESC LIMIT 20")
    public List<Wechat> findwxphoto();

    @Select("SELECT * FROM user_imformation u WHERE u.openId=#{openId}")
    public Wechat findwechat(@Param("openId") String openId);
}
